
uniform sampler2D tex;
varying float LightIntensity;
varying vec2 TexCoord;

void main(void)
{
	gl_FragColor = vec4( texture2D(tex, TexCoord).rgb* max(LightIntensity,0.0), 1.0);
	float x = floor(TexCoord.s * 10);
	float y = floor(TexCoord.t * 10);
	gl_FragColor *= 0.2 + 0.8 * mod(x+y,2.0);
} 
